package com.yin.project.admin.rbac.controller;

import com.yin.project.admin.framework.PageResult;
import com.yin.project.admin.rbac.model.LoginLogEntity;
import com.yin.project.admin.rbac.service.LoginLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * Created by Eason on 2017/2/27.
 * 登录日志控制层
 */
@Controller
@RequestMapping(value = "/loginLog")
public class LoginLogController {

    @Autowired
    private LoginLogService loginLogService;

    @RequestMapping(value = "/_",method = RequestMethod.GET)
    public @ResponseBody PageResult queryAll(){
        PageResult result = new PageResult();
        List<LoginLogEntity> list = loginLogService.getAll();
        result.setItems(list);
        result.setTotalPageSize(20L);
        return result;
    }
}
